namespace DesignPattern.Behavioral.ChainOfResponsibility
{
    public class ChainOfLogger
    {
        public static AbstractLogger Initialize()
        {
            AbstractLogger errorLogger = new ErrorLogger(AbstractLogger.ERROR);
            AbstractLogger debugLogger = new FileLogger(AbstractLogger.DEBUG);
            AbstractLogger infoLogger = new ConsoleLogger(AbstractLogger.INFO);

            errorLogger.SetNextLogger(debugLogger);
            debugLogger.SetNextLogger(infoLogger);

            return errorLogger;
        }
    }
}